﻿#pragma warning(disable: 4996)
#pragma warning(disable: 6031)

/*
*/

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

typedef struct Matrix_s {
	int m;
	int n;
	int v[10][10];
}Matrix;

typedef struct TContext_s
{
	int n;
}TContext;

TContext context;

void read_data(TContext* ctx)
{
}

Matrix read_mat()
{
	Matrix mat = { 0 };
	scanf("%d", &mat.m);
	scanf("%d", &mat.n);
	for (int i = 0; i < mat.m; ++i)
		for (int j = 0; j < mat.n; ++j)
			scanf("%d", &mat.v[i][j]);
	return mat;
}

void dump(TContext* ctx)
{
}

int judge_mat(Matrix* mat)
{
	for (int i = 1; i < mat->n; ++i)
		for (int j = 0; j < i; ++j)
			if (mat->v[i][j] != 0)
				return 0;
	return 1;
}

void exchange(TContext* ctx)
{
	Matrix mat = read_mat();
	for (int i = 0; i < mat.m; ++i)
	{
		int s = 0;
		for (int j = 0; j < mat.n; ++j)
			s += mat.v[i][j];
		printf("%d\n", s);
	}
}

void solve(TContext* ctx)
{
	read_data(ctx);
	exchange(ctx);
}

int main()
{
	freopen("D:/Develop/GitRepos/MOOC/浙江大学/数据结构/201906/DataStructure/M2019秋C入门和进阶练习集/7-98.txt", "r", stdin);
	solve(&context);
	return 0;
}
